
<%@ page import="aiball.Team" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'team.label', default: 'Team')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-team" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-team" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list team">
			
				<g:if test="${teamInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="team.name.label" default="Name" />:</span>
					<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${teamInstance}" field="name"/></span>
				</li>
				</g:if>
			
				<g:if test="${teamInstance?.logoURL}">
				<li class="fieldcontain">
					<span id="logoURL-label" class="property-label">Logo:</span>
					<span class="property-value" aria-labelledby="logoURL-label"><g:fieldValue bean="${teamInstance}" field="logoURL"/></span>
				</li>
				</g:if>
			
				<g:if test="${teamInstance?.description}">
				<li class="fieldcontain">
					<span id="description-label" class="property-label">Beschreibung:</span>
					<span class="property-value" aria-labelledby="description-label"><g:fieldValue bean="${teamInstance}" field="description"/></span>
				</li>
				</g:if>
			
				<g:if test="${teamInstance?.warcry}">
				<li class="fieldcontain">
					<span id="warcry-label" class="property-label">Schlachtruf:</span>
					<span class="property-value" aria-labelledby="warcry-label"><g:fieldValue bean="${teamInstance}" field="warcry"/></span>
				</li>
				</g:if>
			
				<g:if test="${teamInstance?.player1}">
				<li class="fieldcontain">
					<span id="player1-label" class="property-label">Spieler 1:</span>
					<span class="property-value" aria-labelledby="player1-label"><g:link controller="player" action="show" id="${teamInstance?.player1?.id}">${teamInstance?.player1?.name?.encodeAsHTML()}</g:link></span>
				</li>
				</g:if>
			
				<g:if test="${teamInstance?.player2}">
				<li class="fieldcontain">
					<span id="player2-label" class="property-label">Spieler 2:</span>
					<span class="property-value" aria-labelledby="player2-label"><g:link controller="player" action="show" id="${teamInstance?.player2?.id}">${teamInstance?.player2?.name?.encodeAsHTML()}</g:link></span>
				</li>
				</g:if>
			
				<g:if test="${teamInstance?.player3}">
				<li class="fieldcontain">
					<span id="player3-label" class="property-label">Spieler 3:</span>
					<span class="property-value" aria-labelledby="player3-label"><g:link controller="player" action="show" id="${teamInstance?.player3?.id}">${teamInstance?.player3?.name?.encodeAsHTML()}</g:link></span>
				</li>
				</g:if>
			
				<g:if test="${teamInstance?.player4}">
				<li class="fieldcontain">
					<span id="player4-label" class="property-label">Spieler 4:</span>
					<span class="property-value" aria-labelledby="player4-label"><g:link controller="player" action="show" id="${teamInstance?.player4?.id}">${teamInstance?.player4?.name?.encodeAsHTML()}</g:link></span>
				</li>
				</g:if>
			
				<g:if test="${teamInstance?.player5}">
				<li class="fieldcontain">
					<span id="player5-label" class="property-label">Spieler 5:</span>
					<span class="property-value" aria-labelledby="player5-label"><g:link controller="player" action="show" id="${teamInstance?.player5?.id}">${teamInstance?.player5?.name?.encodeAsHTML()}</g:link></span>
				</li>
				</g:if>
			
				<g:if test="${teamInstance?.model}">
				<li class="fieldcontain">
					<span id="model-label" class="property-label">Trikot-Farbe:</span>
					<span id="farbe" class="property-value" aria-labelledby="model-label"><g:fieldValue bean="${teamInstance}" field="model"/></span>
				</li>
				</g:if>
			
			
			<div id="list-gamecharts" class="content scaffold-list" role="main">
			<h1>Gespielte Matches</h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>
						<th></th>
						<th><g:message code="gamecharts.team1.label" default="Team 1" /></th>
						<g:sortableColumn property="team1Goals" title="${message(code: 'gamecharts.team1Goals.label', default: 'Tore')}" />
						<th><g:message code="gamecharts.team2.label" default="Team 2" /></th>
						<g:sortableColumn property="team2Goals" title="${message(code: 'gamecharts.team2Goals.label', default: 'Tore')}" />
					</tr>
				</thead>
				<tbody>
				<g:each in="${gameInstanceList}" status="i" var="gameInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td><g:link controller="Gamecharts" action="show" id="${gameInstance.id}">Spiel ansehen</g:link></td>
						<td>${gameInstance?.team1?.name.encodeAsHTML()}</td>
						<td>${fieldValue(bean: gameInstance, field: "team1Goals")}</td>
						<td>${gameInstance?.team2?.name.encodeAsHTML()}</td>
						<td>${fieldValue(bean: gameInstance, field: "team2Goals")}</td>
					</tr>
				</g:each>
				</tbody>
			</table>
			</div>
			
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${teamInstance?.id}" />
					<g:link class="edit" action="edit" id="${teamInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					</fieldset>
			</g:form>
		</div>
	</body>
</html>
